/**
 * step js file
 *
 * @author: Wang Taohong <wangtaohong@123.com.cn>
 * @link:  (步骤)    http://www.huamill.com 
 * @copyright: 花密欧平台【安徽云掌】
 */

$(function(){

	// 下拉列表赋值
    $('.order-self select').change(function () {
        var selectOption = $(this).find('option:selected').text();
        $(this).prev().html(selectOption);
    });
    
//单选
$(".radio .radio-list").click(function(){
    $(this).find("input").prop("checked");
    $(this).siblings().find("input").attr('checked',false)
    $(this).find("label").addClass("checked");
    $(this).siblings().find("label").removeClass("checked")
});
//多选
$(".checkbox p").click(function(){
    if($(this).find("input").attr("checked")){
        $(this).find("input").attr('checked',false);
        $(this).find("label").removeClass("checked");
    }else{
        $(this).find("input").attr('checked',true);
        $(this).find("label").addClass("checked");
    }
});

      //省市区
		   $("#citypicker").distpicker({
		          province: "浙江省",
		          city: "杭州市",
		          district: "西湖区"
		        });
    
    //年月日
    $.ms_DatePicker({
        YearSelector: ".sel_year",
        MonthSelector: ".sel_month",
        DaySelector: ".sel_day",
        YearNum: 2018,
        MonthNum: 03,
        DateNum: 05
    });
    
    $.ms_DatePicker({
        YearSelector: ".sel_year1",
        MonthSelector: ".sel_month1",
        DaySelector: ".sel_day1",
        YearNum: 2015,
        MonthNum: 03,
        DateNum: 05
    });
    


});


//点击显示内容

showHide(".time-select",".delivery_time",".peisong_time");
showHide(".fapiao","",".invoice-info");
showHide(".design-shop","",".flower-name");
showHide(".module-select",".module-info","");

function showHide(sel,conSel,conSel1){
	$(sel).click(function(){
		if($(this).find("input").attr("checked")){
	    	$(conSel).removeClass("hide");
	    	$(conSel1).addClass("hide");
	    }else{
	    	$(conSel).addClass("hide");
	    	$(conSel1).removeClass("hide");
	    }
	});
}



 
 
 
